<!DOCTYPE HTML>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="gray-bg">
    <div class="container-div">
		<div class="col-sm-12 select-info">
			<form id="role-form">
				<div class="select-list">
					<ul>
						<li>
							电影标题：<input type="text" name="title"/>
						</li>
						<li>
							电影链接类型：<select name="type">
							<option th:value="111">恐怖</option>
							<option   th:value="112">惊悚</option>
							<option   th:value="113">犯罪</option>
							<option   th:value="114">枪战</option>
							<option   th:value="115">动作</option>
							<option   th:value="116">爱情</option>
							<option   th:value="117">喜剧</option>
							<option th:value="118">悬疑</option>
							<option   th:value="119">动画</option>
							<option   th:value="120">家庭</option>
							<option   th:value="121">奇幻</option>
							<option   th:value="122">魔幻</option>
							<option   th:value="123">科幻</option>
							<option   th:value="124">战争</option>
							<option   th:value="125">青春</option>
						</select>
						</li>
						<li>
							<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
							<a class="btn btn-success btn-rounded btn-sm" onclick="$.table.exportExcel()" shiro:hasPermission="system:role:export"><i class="fa fa-download"></i>&nbsp;导出</a>
						</li>
					</ul>
				</div>
			</form>
		</div>
		<div class="btn-group hidden-xs" id="toolbar" role="group">
			<a class="btn btn-outline btn-success btn-rounded" onclick="$.operate.add()" shiro:hasPermission="module:rimen:add">
				<i class="fa fa-plus"></i>新增
			</a>
			<a class="btn btn-outline btn-danger btn-rounded" onclick="$.operate.removeAll()" shiro:hasPermission="module:rimen:remove">
				<i class="fa fa-trash-o"></i>删除
			</a>
		</div>
			
		<div class="col-sm-12 select-table table-striped">
			<table id="bootstrap-table" data-mobile-responsive="true"></table>
		</div>
    </div>
    <div th:include="include :: footer"></div>
    <script th:inline="javascript">
        var editFlag = [[${@permission.hasPermi('module:rimen:edit')}]];
        var removeFlag = [[${@permission.hasPermi('module:rimen:remove')}]];
        var sys_movie = [[${@dict.getType('sys_movie')}]];
        var prefix = ctx + "module/rimen"

        $(function() {
            var options = {
                url: prefix + "/list",
                createUrl: prefix + "/add",
                updateUrl: prefix + "/edit/{id}",
                removeUrl: prefix + "/remove",
                exportUrl: prefix + "/export",
                modalName: "电影链接",
                columns: [{
		            checkbox: true
		        },
				{
					field : 'id', 
					title : '主键id' 
				},
				{
					field : 'imgsrc', 
					title : '图片地址' 
				},
				{
					field : 'title', 
					title : '电影标题'
				},
				{
					field : 'videosrc', 
					title : '电影地址'
				},
				{
					field : 'spancontent', 
					title : '图片地址' 
				},
				{
					field : 'type', 
					title : '电影类型编号',
                    align: 'center',
                    formatter: function(value, row, index) {
                        return $.table.selectDictLabel(sys_movie, value);
                    }
				},
				{
					field : 'score', 
					title : '电影评分'
				},
				{
					field : 'info', 
					title : '电影信息'
				},
		        {
		            title: '操作',
		            align: 'center',
		            formatter: function(value, row, index) {
		            	var actions = [];
		            	actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="#" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
                        actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="#" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
						return actions.join('');
		            }
		        }]
            };
            $.table.init(options);
        });
    </script>
</body>
</html>